In the world of probability, a Random Variable is not a placeholder for an unknown number like in algebra. Instead, think of it as a formal translator. It is a real-valued function $X: S \rightarrow \mathbb{R}$ that maps every qualitative outcome of an experiment (like "drawing a white ball") into a quantitative numerical value (like "-1 dollar").
The Logic of Mapping
By using random variables, we stop talking about sets of abstract outcomes and start talking about events in terms of numbers. For example, if we toss a coin three times, instead of looking at the set $\{HHT, HTH, THH\}$, we define $X$ as "the number of heads" and simply analyze the event $X=2$.
A random variable is discrete if its range is finite or countably infinite (like the integers). This is a vital distinction because it allows us to use summation ($∑$) rather than integration to find total probabilities.
The Probability Mass Function (PMF)
The PMF, denoted $p(a)$, captures the probability that a discrete random variable takes a specific value $a$. It must satisfy two non-negotiable axioms:
- $p(x_i) \geq 0$ (No negative probabilities).
- $\sum_{i=1}^{\infty} p(x_i) = 1$ (The total probability mass must account for all possible outcomes).
Worked Example: The Urn Paradox
Consider an urn with 8 white, 4 black, and 2 orange balls. We draw a ball and define $X$ as our winnings: we win $2 for black, but lose $1 for white. The PMF transforms the act of "drawing a ball" into a financial distribution, allowing us to calculate the likelihood of going broke versus breaking even.
If $p(i) = c\lambda^i/i!$ for $i=0, 1, 2, \dots$, we first find $c$ by ensuring the sum equals 1. Using the Taylor series for $e^\lambda$, we find $c = e^{-\lambda}$. Then, $P\{X=0\} = e^{-\lambda}$ and $P\{X>2\} = 1 - e^{-\lambda}(1 + \lambda + \lambda^2/2)$.